﻿using System;
using System.ComponentModel;
using PocketBook.Model;
using PocketBook.Properties;

namespace PocketBook.ViewModels.Designs
{
    [TypeConverter(typeof(PropertySorter))]
    [DisplayName("Cover Page Settings")]
    public class CoverPageSettings : ICloneable
    {
        public const string SettingsCategory = "Settings";

        [Category(SettingsCategory)]
        [SortPriority(100)]
        public string Name { get; set; }

        [Category(SettingsCategory)]
        [SortPriority(99)]
        public string Address { get; set; }

        [Category(SettingsCategory)]
        [SortPriority(98)]
        public string City { get; set; }

        [Category(SettingsCategory)]
        [SortPriority(97)]
        public string State { get; set; }

        [Category(SettingsCategory)]
        [SortPriority(96)]
        [DisplayName("Postcode")]
        public string PostCode { get; set; }

        [Category(SettingsCategory)]
        [SortPriority(95)]
        public string Telephone { get; set; }

        [Category(SettingsCategory)]
        [DisplayName("Email Address")]
        public string EmailAddress { get; set; }
    
        object ICloneable.Clone()
        {
            return new CoverPageSettings
                   {
                       Name = Name,
                       Address = Address,
                       City = City,
                       State = State,
                       PostCode = PostCode,
                       Telephone = Telephone,
                       EmailAddress = EmailAddress
                   };
        }
    }

    [DesignResources(typeof(Resources))]
    public class CoverPage : CustomisableDesign<CoverPageSettings>
    {
    }
}